#ifndef CMESSAGER_H_
#define CMESSAGER_H_

typedef int MSGID;

enum eMsgType	{ MSG_NULL = 0,
MSG_CREATE_PLAYER,
MSG_DESTROY_PLAYER,
MSG_CREATE_ENEMY,
MSG_DESTROY_ENEMY,
MSG_CREATE_POWERUP,
MSG_DESTROY_POWERUP,
MSG_MAX };

// The first message that ever exist, and all other messages are its children.
class CMessager 
{
private:
	MSGID m_MsgID;
public:
	CMessager( MSGID MsgID )
	{
		m_MsgID = MsgID;
	}
	MSGID GetMessageID( void ) { return m_MsgID; }
};

class CCreatePlayerMessage : public CMessager
{
private:
	float m_fPosX;
	float m_fPosY;
	float m_fVelX;
	float m_fVelY;
	int m_nImageID;
	int m_nWidth;
	int m_nHeight;
public:
	CCreatePlayerMessage( float fPosX, float fPosY, float fVelX, float fVelY,
		int nImageID, int nWidth, int nHeight ) : CMessager( MSG_CREATE_PLAYER )
	{
		m_fPosX = fPosX;
		m_fPosY = fPosY;
		m_fVelX = fVelX;
		m_fVelY = fVelY;
		m_nImageID = nImageID;
		m_nWidth = nWidth;
		m_nHeight = nHeight;
	}
	float GetPosX( void ) { return m_fPosX; }
	float GetPosY( void ) { return m_fPosY; }
	float GetVelX( void ) { return m_fVelX; }
	float GetVelY( void ) { return m_fVelY; }
	int GetImageID( void ) { return m_nImageID; }
	int GetWidth( void ) { return m_nWidth; }
	int GetHeight( void ) { return m_nHeight; }
};
class CPlayer;
class CDestroyPlayerMessage : public CMessager
{
private:
	CPlayer* m_pPlayer;
public:
	CDestroyPlayerMessage( CPlayer* pPlayer ) : CMessager( MSG_DESTROY_PLAYER )
	{
		m_pPlayer = pPlayer;
	}

	CPlayer* GetPlayerToDestroy( void ) { return m_pPlayer; }
};
class CCreateEnemyMessage : public CMessager
{
private:
	float m_fPosX;
	float m_fPosY;
	float m_fVelX;
	float m_fVelY;
	int m_nImageID;
	int m_nWidth;
	int m_nHeight;
public:
	CCreateEnemyMessage( float fPosX, float fPosY, float fVelX, float fVelY,
		int nImageID, int nWidth, int nHeight ) : CMessager( MSG_CREATE_ENEMY )
	{
		m_fPosX = fPosX;
		m_fPosY = fPosY;
		m_fVelX = fVelX;
		m_fVelY = fVelY;
		m_nImageID = nImageID;
		m_nWidth = nWidth;
		m_nHeight = nHeight;
	}
	float GetPosX( void ) { return m_fPosX; }
	float GetPosY( void ) { return m_fPosY; }
	float GetVelX( void ) { return m_fVelX; }
	float GetVelY( void ) { return m_fVelY; }
	int GetImageID( void ) { return m_nImageID; }
	int GetWidth( void ) { return m_nWidth; }
	int GetHeight( void ) { return m_nHeight; }
};
class CEnemy;
class CDestroyEnemyMessage : public CMessager
{
private:
	CEnemy* m_pEnemy;
public:
	CDestroyEnemyMessage( CEnemy* pEnemy ) : CMessager( MSG_DESTROY_ENEMY )
	{
		m_pEnemy = pEnemy;
	}
	
	CEnemy* GetEnemyToDestroy( void ) { return m_pEnemy; }
};
class CCreatePowerUpMessage : public CMessager
{
private:
public:
	CCreatePowerUpMessage( ) : CMessager( MSG_CREATE_POWERUP )
	{
	}
};
class CDestroyPowerUpMessage : public CMessager
{
private:
public:
	CDestroyPowerUpMessage( ) : CMessager( MSG_DESTROY_POWERUP )
	{
	}
};
#endif 